{% extends 'base.html' %}
{% block content%}
    {% if request.user.get_profile.get_units.count > 0 %}
        <table class="tabl">
        {% for unit in request.user.get_profile.get_units %}
            <tr><td class="heador" style="font-size:14px;"><strong>
                <a href="{% url employee_list unit.pk %}">
                    [{{ unit.abb }}] - {{ unit.title }}
                </a></strong>
            </td></tr>
            <tr class="color1"><td>&nbsp;</td></tr>
            <tr class="color1"><td><table width=100%;>
            {% for em in unit.get_employees %}
                {% cycle '<tr class="color1">' '' '' %}
                    <td class="three">{{em.get_full_url|safe}}</td>
                {% cycle '' '' '</tr>' %}
            {% empty %}
                Нет никто!
            {% endfor %}
            </table></td></tr>
        {% endfor %}
        </table>
    {% else %}
<h4>Список подразделений</h4>
{% for item in object_list %}
    <p><a href="{% url employee_list item.pk %}">{{item.title}}</a></p>

    {% empty %}
        Подразделений нет
{% endfor %}
    {% endif %}
{% endblock%}
